set(CPP14_SOURCES
    auto_return_type.cpp
    generic_lambdas.cpp
    variable_templates.cpp
    binary_literals.cpp
    digit_separators.cpp
    deprecated_attribute.cpp
    smart_pointers.cpp
    quoted.cpp
    exchange.cpp
    integer_sequence.cpp
    features.cpp
)

# 创建库（供其他项目使用）
add_library(cpp14_features_lib ${CPP14_SOURCES})
target_compile_features(cpp14_features_lib PUBLIC cxx_std_14)

# 创建可执行文件
add_executable(cpp14_features main.cpp)
target_compile_features(cpp14_features PUBLIC cxx_std_14)
target_link_libraries(cpp14_features cpp14_features_lib)

# 为了向后兼容，创建别名
add_library(cpp14_features ALIAS cpp14_features_lib) 